﻿function WinOpen(pageUrl, target, WinWidth, WinHeight) {
    //debugger;
    var popwin = window.open(pageUrl, target, "scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=" + WinWidth + ",height=" + WinHeight + ",left=" + (screen.width - WinWidth) / 2 + ",top=" + (screen.height - WinHeight - 100) / 2); 
	popwin.focus();
	return false; 
}
function WinOpen2(pageUrl,target,WinWidth,WinHeight,scrollbars) 
{ 
	var popwin=window.open(pageUrl,target,"scrollbars="+scrollbars+",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width="+WinWidth+",height="+WinHeight + ",left=" + (screen.width-WinWidth)/2 + ",top=" + (screen.height-WinHeight-100)/2); 
	popwin.focus();
	return false; 
}
function WinOpenImage(pageUrl,target,WinWidth,WinHeight) 
{ 
	var popwin=window.open(pageUrl,target,"scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width="+WinWidth+",height="+WinHeight + ",left=" + (screen.width-WinWidth)/2 + ",top=0"); 
	popwin.focus();
	return false;
}

function openPopWin(url, width, height, callback, title) {
    top.openPopWindow(window, title, url, callback, true, width, height);
}

function closePopWin() {
    while (parent != undefined) {
        if (parent.closedlg != undefined) {
            parent.closedlg();
            break;
        }
    }
}